<?php

class ui_datatable_cell extends ui
{
	function __construct($row,$col,$db_name)
	{
		$this->init(__FILE__,'td',array('class'=>'datatable_cell',));
		$this->row = $row;
		$this->col = $col;
		$this->db_name = $db_name;
		$this->row = $row;
		$this->col = $col;
		
	}
	
	function pre_render($data=null)
	{
		global $ti;
		parent::pre_render($data);
		#echo('cell prerender called: '.print_r($data,true));
		$this->set('id',$this->parent->parent->name.'_'.$this->row.'x'.$this->col);
		#if(is_array($data))
		#{
		#	$this->text($data[$this->db_name]);
		#}
	}
	
	function post_render($data=null)
	{
		if(is_array($data))
		{
			$this->html = ti_util::swap($this->html,$data);
		}
	}	
}

?>